package com.设计模式.抽象工厂模式;

/**
 * @author Fitch
 */
public class ColorFactory extends AbstractFactory{
    @Override
    Color getColor(String colorType) {
        if(colorType == null){
            return null;
        }
        if(colorType == "red"){
            return new Red();
        }else if(colorType == "green"){
            return new Green();
        }else if(colorType =="blue"){
            return new Blue();
        }
        return null;
    }

    @Override
    Shape getShape(String shapeType) {
        return null;
    }
}
